(function(){
	Ext.onReady(function(){
		Ext.define("person",{
			extend:"Ext.data.Model",
			fields:[
				{name:'name',type:'auto'},
				{name:'age',type:'int'},
				{name:'email',type:'auto'}
			]
		});
		
		Ext.regModel('user',{
			fields:[
				{name:'name',type:'auto'},
				{name:'age',type:'int'},
				{name:'email',type:'auto'}
			]
		})
		//1 new
		var p = new person({
			name:'tang',
			age:25,
			email:'javatzp@163.com'
		});
		alert(p.get('name'));
		//2 create  推荐
		var p2 = Ext.create('person',{
			name:'tang1',
			age:25,
			email:'javatzp@163.com'
		});
		alert(p2.get('name'));
		// 3
		var p3 = Ext.ModelMgr.create({
			name:'tang1',
			age:25,
			email:'javatzp@163.com'
		},'person');
		alert(p3.get('email'));
		alert(person.getName());
	});	
})();